#pragma once

#include "Singleton.h"
#include <string.h>
#include <stdio.h>

/****************************************************
  Game utils. Implements random functions, Serial
  keys, and so on.
 ****************************************************/
class GameSystem : public Singleton
{
public:
        // Get next serial number
        static int getNextSn();

        // Get the string length
        static int getStrLen(char * str){
            return strlen(str);
        }
        static int getStrLen(wchar_t * str){
            return wcslen(str);
        }

        // Copy specified range to a c string
        static char * strCopyEx(char * dest, const char * src, int from, int to){
            return strncpy(dest, &(src[from]), to - from);
        }

        static bool isSeperator(char);

private:	
        static char SEP[];

	~GameSystem();

        static int _sn;
};
